package com.project.service;

import com.project.dao.IUserDao;
import com.project.server.Request;
import com.project.server.Response;
import com.project.uitl.DaoFactory;
import com.project.uitl.WebServlet;

@WebServlet("update")
public class UpdateService  implements Servlet {

    private IUserDao dao =(IUserDao) DaoFactory.getDao("IUserDao");

    public void service(Request request, Response response) {
        int id = Integer.parseInt(request.getParameter("id"));
        String pwd = request.getParameter("pwd");
        dao.update(id, pwd);

        FindAllService findAllService = new FindAllService();
        findAllService.service(request, response);


    }
}
